﻿@model Forest.Cat.Web.Models.JobBrowseModel
@using Forest.Cat.Domain.Shared
@{
    ViewBag.Title = "职位浏览";
    Layout = "~/Views/Shared/_Root.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $('.menuTrigger').each(function () {
            $(this).bind('mouseover', function () {
                $('.optionMenu').hide();
                var offset = $(this).offset();
                var optionMenu = $(this).parent().find('.optionMenu');
                optionMenu.css("top", offset.top - 10);
                optionMenu.css("left", offset.left + 25);
                optionMenu.show();
                optionMenu.mouseover();
                return false;
            });
        });

        //        $('.optionMenu').bind('mouseout', function () {
        //            $('.optionMenu').hide();
        //        });

        $('#close').bind('click', function () {
            $(this).parent().hide();
            return false;
        });

        $(document).bind('click', function () {
            $('.optionMenu').hide();
        });
    });

</script>
<div class="main_result">
    找工作 &gt; <b>浏览职位</b></div>
<div class="browse_content">
    <div class="browse_content_left">
        <div class="browse_menus">
            <ul>
                <li><a href="@Url.Action("JobLovBrowse", new { lovType = LovType.JobCategory })">按职位类别</a></li>
                @* <li><a href="#">按行业</a></li>
                <li><a href="#">按地区</a></li>
                <li><a href="#">按园区</a></li>*@
            </ul>
        </div>
        <div class="browse_box">
            <ul>
                @foreach (var item in Model.JobLovModelList)
                { 
                    <li>
                        <div>
                            <h3>@item.Name</h3>
                            @foreach (var x in item.SubList)
                            {
                                <div>
                                    <b style="cursor: pointer" id="@x.Id" class="menuTrigger">@x.Name</b> <span class="optionMenu" id="menu@(x.Id)" style=" background-color:White; position: absolute; z-index: 1000px; display: none">
                                        <span id="close"><a href="#">关闭</a></span> <span><a href="@Url.Action("SearchJobList", new { lovCondition = ((int)LovType.ParentCategory).ToString() + "-" + x.Value })" style=" font-weight:bold; color:#ff6600; margin-top:3px;">
                                            全部@(x.Name)</a> </span>
                                        @foreach (var y in x.SubList)
                                        { 
                                            <span><a href="@Url.Action("SearchJobList", new { lovCondition = ((int)LovType.JobCategory).ToString() + "-" + y.Value })">@y.Name</a>
                                            </span>
                                        }
                                    </span>
                                </div>  
                            }
                        </div>
                    </li>
                }
            </ul>
        </div>
    </div>
    <div class="browse_content_right">
        <div class="browse_content_title">
            热门搜索</div>
        <div class="browse_content_box">
            <ul>
                @foreach (var hotword in Model.HotWordList)
                { 
                    <li>@Html.ActionLink(hotword.WordText, "SearchJobList", "Catalog", new { jobTitle = hotword.WordText }, null)
                    </li>
                }
            </ul>
        </div>
    </div>
    <div class="cr">
    </div>
</div>
